
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <title>病历管理</title>
    <style type="text/css">
        .banes {
            width: 100%;
            margin:auto;
        }
        #banas{
            width:33%; float: left;
            text-align: center;
        }
        #bana{
            width:33%; float: left;
            text-align: center;
            background-color:#00a2d4;
            color: #ffffff;
        }
        #banak{
            width:33%; float: left;
            text-align: center;
        }
    </style>
    <?php PrintPageHead(); ?>
</head>
<body>


<?php

/**
 * Created by PhpStorm. User: ADun, Date: 14-10-15 下午10:11
 * Description:
 */
$openId=getCurrentUserOID();

if(empty($openId)) exit('参数错误');

$bm = new CUI数据中心(Page::b病历列表,$openId);
$添加病历 = $bm->生成有效链接('Seller16AddRecords',$_GET['state']);
$病历详情 = $bm->生成有效链接('Seller15record',$_GET['state']);
$在院病历 = $bm->生成有效链接('Seller15records',$_GET['state']);
$历史病历 = $bm->生成有效链接('Seller15history',$_GET['state']);
$空床位列表 = $bm->生成有效链接('Seller15open',$_GET['state']);
$搜索 = "";
if($_POST['标题']){
    $搜索['标题'] = $_POST['标题'];
}

$病历 = $bm->bl历史病历($_GET['page'],$_GET,$搜索);

?>
<div class="container-fluid">
    <div class="panel panel-primary">
        <div class="panel-heading text-center"><h3 class="panel-title">病历管理</h3></div>
        <div class="panel-body">
            <div  class="banes">
                <a href="<?=$在院病历?>"> <div class="form-control"id="banas">在院病历</div></a>
                <a href="<?=$空床位列表?>"> <div class="form-control"id="banak">空床位</div></a>
                <a href="<?=$历史病历?>"> <div class="form-control"id="bana">历史病历</div></a>
            </div>
        </div>
        <div class="panel-body">
            <form action="" method="post">
                住院号:<input type="text" name="标题" style="width: 20%" value="<?=$搜索['标题']?>">
                <input type="submit" value="查询">
            </form>
        </div>
        <div class="panel-body">
            <div class="panel-group"  id="accordion" role="tablist" aria-multiselectable="true">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <div class="row">
                            <div class="col-xs-7 text-justify" style="width: 30%">
                                病历号
                            </div>
                            <div class="col-xs-7 text-justify" style="width: 30%">
                                住院号
                            </div>
                            <div class="col-xs-7 text-justify" style="width: 40%">
                                医生
                            </div>
                        </div>
                    </div>

                </div>
                <?php
                foreach($病历['result'] as  $key=>$value){ ?>
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <div class="row">
                                <div class="col-xs-7 text-justify" style="width: 30%">
                                    <?php echo $value['姓名']; ?>
                                </div>
                                <div class="col-xs-7 text-justify" style="width: 30%">
                                    <a href="<?=$病历详情."&id=".$value['id']?>"><?php echo $value['title']; ?></a>
                                </div>
                                <div class="col-xs-7 text-justify" style="width: 40%">
                                    <?php echo $value['name']; ?>
                                </div>
                            </div>
                        </div>
                    </div>
                <?php }?>

                <div class="panel panel-default">
                    <div class="panel-heading">

                        <div class="row">
                            <a href="<?=$添加病历?>"><div class="col-xs-7 text-justify" style="width: auto">
                                    添加病历  <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
                                </div>
                            </a>
                        </div>
                    </div>

                </div>
            </div>
            <?= $病历['show'] ?>
        </div>
    </div>
    <form>
        <input type="hidden" name="openId" value="<?=$openId?>" />
    </form>
</div>

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="../resource/js/jquery-1.11.1.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="../resource/js/bootstrap.min.js"></script>
<script src="../resource/js/hermes.js"></script>
<script language="JavaScript">
    function start_talk(uid){
        var oid='<?=$openId?>';
        var rst=hermes.callServerFunction(oid,'talk',{'uid':uid});
        if(!rst['error']) {
            alertify.alert(rst['msg'],function(e){
                if(e){
                    closeWind();
                }
            });
        }
    }
</script>
</body>
</html>